import { defineStore } from 'pinia'

export const useCounterStore = defineStore('counter', {
    state(){
        return{
            count: 0
        }
    },
    actions: {
        increment() {
            this.count++
        },
    },
})

export const useCounterTwo = defineStore('counterTwo', {
    state(){
        return{
            countTwo: 0
        }
    },
    actions: {
        incrementTwo() {
            const store = useCounterStore()
            this.countTwo = store.count + 10;
        },
    },
})